{%- set localsocket = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOCALSOCKET', '/run/clamav/clamd.ctl') -%}
{%- set localsocketgroup = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOCALSOCKETGROUP', 'clamav') -%}
{%- set localsocketmode = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOCALSOCKETMODE', '666') -%}
{%- set archiveblockencrypted = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_ARCHIVEBLOCKENCRYPTED', 'false') -%}
{%- set maxdirectoryrecursion = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXDIRECTORYRECURSION', '15') -%}
{%- set readtimeout = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_READTIMEOUT', '120') -%}
{%- set maxthreads = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXTHREADS', '12') -%}
{%- set maxconnectionqueuelength = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXCONNECTIONQUEUELENGTH', '15') -%}
{%- set logsyslog = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOGSYSLOG', 'false') -%}
{%- set logrotate = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOGROTATE', 'false') -%}
{%- set logfacility = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOGFACILITY', 'LOG_LOCAL6') -%}
{%- set logverbose = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOGVERBOSE', 'false') -%}
{%- set databasedirectory = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_DATABASEDIRECTORY', '/var/lib/clamav') -%}
{%- set selfcheck = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_SELFCHECK', '3600') -%}
{%- set debug = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_DEBUG', 'false') -%}
{%- set maxembeddedpe = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXEMBEDDEDPE', '10M') -%}
{%- set maxhtmlnormalize = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXHTMLNORMALIZE', '10M') -%}
{%- set maxhtmlnotags = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXHTMLNOTAGS', '2M') -%}
{%- set maxscriptnormalize = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXSCRIPTNORMALIZE', '5M') -%}
{%- set maxziptypercg = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXZIPTYPERCG', '1M') -%}
{%- set scanswf = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_SCANSWF', 'true') -%}
{%- set scanmail = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_SCANMAIL', 'false') -%}
{%- set exitonoom = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_EXITONOOM', 'false') -%}
{%- set leavetemporaryfiles = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LEAVETEMPORARYFILES', 'false') -%}
{%- set idletimeout = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_IDLETIMEOUT', '30') -%}
{%- set phishingsignatures = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_PHISHINGSIGNATURES', 'true') -%}
{%- set phishingscanurls = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_PHISHINGSCANURLS', 'false') -%}
{%- set phishingalwaysblocksslmismatch = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_PHISHINGALWAYSBLOCKSSLMISMATCH', 'false') -%}
{%- set phishingalwaysblockcloak = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_PHISHINGALWAYSBLOCKCLOAK', 'false') -%}
{%- set partitionintersection = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_PARTITIONINTERSECTION', 'false') -%}
{%- set scanpartialmessages = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_SCANPARTIALMESSAGES', 'false') -%}
{%- set heuristicscanprecedence = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_HEURISTICSCANPRECEDENCE', 'false') -%}
{%- set structureddatadetection = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_STRUCTUREDDATADETECTION', 'false') -%}
{%- set commandreadtimeout = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_COMMANDREADTIMEOUT', '30') -%}
{%- set sendbuftimeout = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_SENDBUFTIMEOUT', '500') -%}
{%- set maxqueue = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXQUEUE', '100') -%}
{%- set extendeddetectioninfo = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_EXTENDEDDETECTIONINFO', 'true') -%}
{%- set ole2blockmacros = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_OLE2BLOCKMACROS', 'false') -%}
{%- set allowallmatchscan = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_ALLOWALLMATCHSCAN', 'true') -%}
{%- set forcetodisk = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_FORCETODISK', 'false') -%}
{%- set disablecertcheck = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_DISABLECERTCHECK', 'false') -%}
{%- set disablecache = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_DISABLECACHE', 'false') -%}
{%- set maxscansize = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXSCANSIZE', '100M') -%}
{%- set maxfilesize = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXFILESIZE', '25M') -%}
{%- set maxrecursion = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXRECURSION', '16') -%}
{%- set maxfiles = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXFILES', '10000') -%}
{%- set maxpartitions = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXPARTITIONS', '50') -%}
{%- set maxiconspe = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXICONSPE', '100') -%}
{%- set pcrematchlimit = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_PCREMATCHLIMIT', '10000') -%}
{%- set pcrerecmatchlimit = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_PCRERECMATCHLIMIT', '5000') -%}
{%- set pcremaxfilesize = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_PCREMAXFILESIZE', '25M') -%}
{%- set scanxmldocs = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_SCANXMLDOCS', 'true') -%}
{%- set scanhwp3 = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_SCANHWP3', 'true') -%}
{%- set maxrechwp3 = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_MAXRECHWP3', '16') -%}
{%- set streammaxlength = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_STREAMMAXLENGTH', '25M') -%}
{%- set logfile = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOGFILE', '/var/log/clamav/clamav.log') -%}
{%- set logtime = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOGTIME', 'true') -%}
{%- set logfileunlock = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOGFILEUNLOCK', 'false') -%}
{%- set logfilemaxsize = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_LOGFILEMAXSIZE', '0') -%}
{%- set bytecode = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_BYTECODE', 'true') -%}
{%- set bytecodesecurity = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_BYTECODESECURITY', 'TrustSigned') -%}
{%- set bytecodetimeout = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_BYTECODETIMEOUT', '60000') -%}
{%- set officialdatabaseonly = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_OFFICIALDATABASEONLY', 'false') -%}
{%- set crossfilesystems = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_CROSSFILESYSTEMS', 'true') -%}
{%- set virusevent = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_VIRUSEVENT', '/bin/run-parts --lsbsysinit -- /etc/clamav/virusevent.d/') -%}
{%- set user = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_USER', 'clamav') -%}
{%- set onaccessmaxfilesize = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_ONACCESSMAXFILESIZE', '100M') -%}
{%- set onaccessmaxthreads = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_ONACCESSMAXTHREADS', '5') -%}
{%- set onaccessdisableddd = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_ONACCESSDISABLEDDD', 'false') -%}
{%- set onaccessprevention = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_ONACCESSPREVENTION', 'true') -%}
{%- set onaccessextrascanning = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_ONACCESSEXTRASCANNING', 'true') -%}
{%- set onaccessretryattempts = salt['pillar.get']('default:OMV_CLAMAV_CLAMD_ONACCESSRETRYATTEMPTS', '3') -%}
{{ pillar['headers']['multiline'] }}
LocalSocket {{ localsocket }}
FixStaleSocket true
LocalSocketGroup {{ localsocketgroup }}
LocalSocketMode {{ localsocketmode }}
AlertEncrypted {{ archiveblockencrypted }}
AlertEncryptedArchive {{ archiveblockencrypted }}
AlertEncryptedDoc {{ archiveblockencrypted }}
MaxDirectoryRecursion {{ maxdirectoryrecursion }}
FollowDirectorySymlinks {{ config.clamd.followdirectorysymlinks }}
FollowFileSymlinks {{ config.clamd.followfilesymlinks }}
ReadTimeout {{ readtimeout }}
MaxThreads {{ maxthreads }}
MaxConnectionQueueLength {{ maxconnectionqueuelength }}
LogSyslog {{ logsyslog }}
LogRotate {{ logrotate }}
LogFacility {{ logfacility }}
LogClean {{ config.clamd.logclean }}
LogVerbose {{ logverbose }}
DatabaseDirectory {{ databasedirectory }}
SelfCheck {{ selfcheck }}
Foreground false
Debug {{ debug }}
ScanPE {{ config.clamd.scanpe }}
MaxEmbeddedPE {{ maxembeddedpe }}
ScanOLE2 {{ config.clamd.scanole2 }}
ScanPDF {{ config.clamd.scanpdf }}
ScanHTML {{ config.clamd.scanhtml }}
MaxHTMLNormalize {{ maxhtmlnormalize }}
MaxHTMLNoTags {{ maxhtmlnotags }}
MaxScriptNormalize {{ maxscriptnormalize }}
MaxZipTypeRcg {{ maxziptypercg }}
ScanSWF {{ scanswf }}
ScanELF {{ config.clamd.scanelf }}
ScanArchive {{ config.clamd.scanarchive }}
ScanMail {{ scanmail }}
AlertBrokenExecutables {{ config.clamd.detectbrokenexecutables }}
ExitOnOOM {{ exitonoom }}
LeaveTemporaryFiles {{ leavetemporaryfiles }}
HeuristicAlerts {{ config.clamd.algorithmicdetection }}
IdleTimeout {{ idletimeout }}
PhishingSignatures {{ phishingsignatures }}
PhishingScanURLs {{ phishingscanurls }}
AlertPhishingSSLMismatch {{ phishingalwaysblocksslmismatch }}
AlertPhishingCloak {{ phishingalwaysblockcloak }}
AlertPartitionIntersection {{ partitionintersection }}
DetectPUA {{ config.clamd.detectpua }}
ScanPartialMessages {{ scanpartialmessages }}
HeuristicScanPrecedence {{ heuristicscanprecedence }}
StructuredDataDetection {{ structureddatadetection }}
CommandReadTimeout {{ commandreadtimeout }}
SendBufTimeout {{ sendbuftimeout }}
MaxQueue {{ maxqueue }}
ExtendedDetectionInfo {{ extendeddetectioninfo }}
AlertOLE2Macros {{ ole2blockmacros }}
AllowAllMatchScan {{ allowallmatchscan }}
ForceToDisk {{ forcetodisk }}
DisableCertCheck {{ disablecertcheck }}
DisableCache {{ disablecache }}
MaxScanSize {{ maxscansize }}
MaxFileSize {{ maxfilesize }}
MaxRecursion {{ maxrecursion }}
MaxFiles {{ maxfiles }}
MaxPartitions {{ maxpartitions }}
MaxIconsPE {{ maxiconspe }}
PCREMatchLimit {{ pcrematchlimit }}
PCRERecMatchLimit {{ pcrerecmatchlimit }}
PCREMaxFileSize {{ pcremaxfilesize }}
ScanXMLDOCS {{ scanxmldocs }}
ScanHWP3 {{ scanhwp3 }}
MaxRecHWP3 {{ maxrechwp3 }}
StreamMaxLength {{ streammaxlength }}
LogFile {{ logfile }}
LogTime {{ logtime }}
LogFileUnlock {{ logfileunlock }}
LogFileMaxSize {{ logfilemaxsize }}
Bytecode {{ bytecode }}
BytecodeSecurity {{ bytecodesecurity }}
BytecodeTimeout {{ bytecodetimeout }}
OfficialDatabaseOnly {{ officialdatabaseonly }}
CrossFilesystems {{ crossfilesystems }}
VirusEvent {{ virusevent }}
User {{ user }}
OnAccessMaxFileSize {{ onaccessmaxfilesize }}
OnAccessMaxThreads {{ onaccessmaxthreads }}
OnAccessDisableDDD {{ onaccessdisableddd }}
OnAccessPrevention {{ onaccessprevention }}
OnAccessExtraScanning {{ onaccessextrascanning }}
OnAccessExcludeUname {{ user }}
OnAccessRetryAttempts {{ onaccessretryattempts }}
{%- for onaccesspath in config.onaccesspaths.onaccesspath | selectattr('enable') %}
OnAccessIncludePath {{ salt['omv_conf.get_sharedfolder_path'](onaccesspath.sharedfolderref) }}
{%- endfor -%}
{%- if config.clamd.extraoptions | length > 0 %}
# Extra options
{{ config.clamd.extraoptions }}
{%- endif %}
